package dbclass;

import java.sql.SQLException;
import java.util.List;

import beans.Comentario;
import beans.Imagem;
import beans.Noticia;
import beans.Tag;
import beans.Video;
import beans.Voto;

public interface NoticiaDAO {
	
	public Noticia insert(Noticia noticia) throws SQLException, ClassNotFoundException;
	
	public Noticia update(Noticia noticia) throws SQLException, ClassNotFoundException;
	
	public boolean delete(long id) throws ClassNotFoundException, SQLException;
	
	public List<Noticia> findAll() throws SQLException, ClassNotFoundException;
	
	public List<Noticia> findAll(long id_noticia) throws SQLException, ClassNotFoundException;
	
	public Noticia findById(long id) throws SQLException, ClassNotFoundException;
	 
	public Imagem insertImage(long id_noticia, long id_imagem) throws SQLException, ClassNotFoundException;	
	
	public boolean deleteImage(long id_noticia, long id_imagem) throws SQLException, ClassNotFoundException;
	
	public Video insertVideo(long id_noticia, long id_video) throws SQLException, ClassNotFoundException;	
	
	public boolean deleteVideo(long id_noticia, long id_video) throws SQLException, ClassNotFoundException;
	
	public List<Comentario> findAllComentarios(long id) throws SQLException, ClassNotFoundException;

	public List<Noticia> findPalavra(String palavra) throws SQLException, ClassNotFoundException;
	
	//public List<Tag> findAllTags(long id) throws SQLException, ClassNotFoundException;
	
	public List<Voto> findAllVotos(long id) throws SQLException, ClassNotFoundException;
	
	public List<Imagem> findAllImagens (long id) throws SQLException, ClassNotFoundException;
	
	public List<Video> findAllVideos(long id) throws SQLException, ClassNotFoundException;

	public List<Imagem> getImages(long id) throws SQLException, ClassNotFoundException;
	
	public List<Video> getVideos(long id) throws SQLException, ClassNotFoundException;
	
	public List<Comentario> getComentarios(long id) throws SQLException, ClassNotFoundException;
	
	public long getNota(long id) throws SQLException, ClassNotFoundException;

}
